words = {
    "CORE" : {
        "!" :        "6.1.0010",
        "#" :        "6.1.0030",
        "'" :        "6.1.0070",
        "(" :        "6.1.0080",
        "*" :        "6.1.0090",
        "+" :        "6.1.0120",
        "," :        "6.1.0150",
        "-" :        "6.1.0160",
        "." :        "6.1.0180",
        "/" :        "6.1.0230",
        ":" :        "6.1.0450",
        ";" :        "6.1.0460",
        "<" :        "6.1.0480",
        "=" :        "6.1.0530",
        ">" :        "6.1.0540",
        "@" :        "6.1.0650",
        "I" :        "6.1.1680",
        "J" :        "6.1.1730",
        "[" :        "6.1.2500",
        "]" :        "6.1.2540",
        "#>" :        "6.1.0040",
        "#S" :        "6.1.0050",
        "*/" :        "6.1.0100",
        "+!" :        "6.1.0130",
        '."' :        "6.1.0190",
        "0<" :        "6.1.0250",
        "0=" :        "6.1.0270",
        "1+" :        "6.1.0290",
        "1-" :        "6.1.0300",
        "2!" :        "6.1.0310",
        "2*" :        "6.1.0320",
        "2/" :        "6.1.0330",
        "2@" :        "6.1.0350",
        "<#" :        "6.1.0490",
        ">R" :        "6.1.0580",
        "BL" :        "6.1.0770",
        "C!" :        "6.1.0850",
        "C," :        "6.1.0860",
        "C@" :        "6.1.0870",
        "CR" :        "6.1.0990",
        "DO" :        "6.1.1240",
        "IF" :        "6.1.1700",
        "M*" :        "6.1.1810",
        "OR" :        "6.1.1980",
        "R>" :        "6.1.2060",
        "R@" :        "6.1.2070",
        'S"' :        "6.1.2165",
        "U." :        "6.1.2320",
        "U<" :        "6.1.2340",
        ">IN" :        "6.1.0560",
        "ABS" :        "6.1.0690",
        "AND" :        "6.1.0720",
        "DUP" :        "6.1.1290",
        "KEY" :        "6.1.1750",
        "MAX" :        "6.1.1870",
        "MIN" :        "6.1.1880",
        "MOD" :        "6.1.1890",
        "ROT" :        "6.1.2160",
        "S>D" :        "6.1.2170",
        "UM*" :        "6.1.2360",
        "XOR" :        "6.1.2490",
        "[']" :        "6.1.2510",
        "/MOD" :        "6.1.0240",
        "2DUP" :        "6.1.0380",
        "?DUP" :        "6.1.0630",
        "BASE" :        "6.1.0750",
        "CHAR" :        "6.1.0895",
        "DROP" :        "6.1.1260",
        "ELSE" :        "6.1.1310",
        "EMIT" :        "6.1.1320",
        "EXIT" :        "6.1.1380",
        "FILL" :        "6.1.1540",
        "FIND" :        "6.1.1550",
        "HERE" :        "6.1.1650",
        "HOLD" :        "6.1.1670",
        "LOOP" :        "6.1.1800",
        "MOVE" :        "6.1.1900",
        "OVER" :        "6.1.1990",
        "QUIT" :        "6.1.2050",
        "SIGN" :        "6.1.2210",
        "SWAP" :        "6.1.2260",
        "THEN" :        "6.1.2270",
        "TYPE" :        "6.1.2310",
        "WORD" :        "6.1.2450",
        "*/MOD" :        "6.1.0110",
        "+LOOP" :        "6.1.0140",
        "2DROP" :        "6.1.0370",
        "2OVER" :        "6.1.0400",
        "2SWAP" :        "6.1.0430",
        ">BODY" :        "6.1.0550",
        "ABORT" :        "6.1.0670",
        "ALIGN" :        "6.1.0705",
        "ALLOT" :        "6.1.0710",
        "BEGIN" :        "6.1.0760",
        "CELL+" :        "6.1.0880",
        "CELLS" :        "6.1.0890",
        "CHAR+" :        "6.1.0897",
        "CHARS" :        "6.1.0898",
        "COUNT" :        "6.1.0980",
        "DEPTH" :        "6.1.1200",
        "DOES>" :        "6.1.1250",
        "LEAVE" :        "6.1.1760",
        "SPACE" :        "6.1.2220",
        "STATE" :        "6.1.2250",
        "UNTIL" :        "6.1.2390",
        "WHILE" :        "6.1.2430",
        'ABORT"' :        "6.1.0680",
        "ACCEPT" :        "6.1.0695",
        "CREATE" :        "6.1.1000",
        "FM/MOD" :        "6.1.1561",
        "INVERT" :        "6.1.1720",
        "LSHIFT" :        "6.1.1805",
        "NEGATE" :        "6.1.1910",
        "REPEAT" :        "6.1.2140",
        "RSHIFT" :        "6.1.2162",
        "SM/REM" :        "6.1.2214",
        "SOURCE" :        "6.1.2216",
        "SPACES" :        "6.1.2230",
        "UM/MOD" :        "6.1.2370",
        "UNLOOP" :        "6.1.2380",
        "[CHAR]" :        "6.1.2520",
        ">NUMBER" :        "6.1.0570",
        "ALIGNED" :        "6.1.0706",
        "DECIMAL" :        "6.1.1170",
        "EXECUTE" :        "6.1.1370",
        "LITERAL" :        "6.1.1780",
        "RECURSE" :        "6.1.2120",
        "CONSTANT" :        "6.1.0950",
        "EVALUATE" :        "6.1.1360",
        "POSTPONE" :        "6.1.2033",
        "VARIABLE" :        "6.1.2410",
        "IMMEDIATE" :        "6.1.1710",
        "ENVIRONMENT?" :        "6.1.1345",
    },
    'CORE-EXT' : {
        "\\" :        "6.2.2535",
        ".(" :        "6.2.0200",
        ".R" :        "6.2.0210",
        "0>" :        "6.2.0280",
        "<>" :        "6.2.0500",
        'C"' :        "6.2.0855",
        "OF" :        "6.2.1950",
        "TO" :        "6.2.2295",
        "U>" :        "6.2.2350",
        "0<>" :        "6.2.0260",
        "2>R" :        "6.2.0340",
        "2R>" :        "6.2.0410",
        "2R@" :        "6.2.0415",
        "?DO" :        "6.2.0620",
        "HEX" :        "6.2.1660",
        "NIP" :        "6.2.1930",
        "PAD" :        "6.2.2000",
        "TIB" :        "6.2.2290",
        "U.R" :        "6.2.2330",
        "#TIB" :        "6.2.0060",
        "CASE" :        "6.2.0873",
        "PICK" :        "6.2.2030",
        "ROLL" :        "6.2.2150",
        "SPAN" :        "6.2.2240",
        "TRUE" :        "6.2.2298",
        "TUCK" :        "6.2.2300",
        "AGAIN" :        "6.2.0700",
        "ENDOF" :        "6.2.1343",
        "ERASE" :        "6.2.1350",
        "FALSE" :        "6.2.1485",
        "PARSE" :        "6.2.2008",
        "QUERY" :        "6.2.2040",
        "VALUE" :        "6.2.2405",
        "EXPECT" :        "6.2.1390",
        "MARKER" :        "6.2.1850",
        "REFILL" :        "6.2.2125",
        "UNUSED" :        "6.2.2395",
        "WITHIN" :        "6.2.2440",
        ":NONAME" :        "6.2.0455",
        "CONVERT" :        "6.2.0970",
        "ENDCASE" :        "6.2.1342",
        "COMPILE," :        "6.2.0945",
        "SOURCE-ID" :        "6.2.2218",
        "[COMPILE]" :        "6.2.2530",
        "SAVE-INPUT" :        "6.2.2182",
        "RESTORE-INPUT" :        "6.2.2148",
    },
    'DOUBLE' : {
         "D+" :      "8.6.1.1040",
         "D-" :      "8.6.1.1050",
         "D." :      "8.6.1.1060",
         "D<" :      "8.6.1.1110",
         "D=" :      "8.6.1.1120",
         "M+" :      "8.6.1.1830",
        "D.R" :      "8.6.1.1070",
        "D0<" :      "8.6.1.1075",
        "D0=" :      "8.6.1.1080",
        "D2*" :      "8.6.1.1090",
        "D2/" :      "8.6.1.1100",
        "D>S" :      "8.6.1.1140",
        "M*/" :      "8.6.1.1820",
        "DABS" :      "8.6.1.1160",
        "DMAX" :      "8.6.1.1210",
        "DMIN" :      "8.6.1.1220",
        "DNEGATE" :      "8.6.1.1230",
        "2LITERAL" :      "8.6.1.0390",
        "2CONSTANT" :      "8.6.1.0360",
        "2VARIABLE" :      "8.6.1.0440",
    },
    'DOUBLE-EXT' : {
        "DU<" :      "8.6.2.1270",
        "2ROT" :      "8.6.2.0420",
    },
    'FACILITY' : {
        "KEY?" :     "10.6.1.1755",
        "PAGE" :     "10.6.1.2005",
        "AT-XY" :     "10.6.1.0742",
    },
    'FACILITY-EXT' : {
        "MS" :     "10.6.2.1905",
        "EKEY" :     "10.6.2.1305",
        "EKEY?" :     "10.6.2.1307",
        "EMIT?" :     "10.6.2.1325",
        "EKEY>CHAR" :     "10.6.2.1306",
        "TIME&DATE" :     "10.6.2.2292",
    },
    'STRING' : {
        "BLANK" :     "17.6.1.0780",
        "CMOVE" :     "17.6.1.0910",
        "CMOVE>" :     "17.6.1.0920",
        "SEARCH" :     "17.6.1.2191",
        "/STRING" :     "17.6.1.0245",
        "COMPARE" :     "17.6.1.0935",
        "SLITERAL" :     "17.6.1.2212",
        "-TRAILING" :     "17.6.1.0170",
    },
    'TOOLS' : {
        "?" :     "15.6.1.0600",
        ".S" :     "15.6.1.0220",
        "SEE" :     "15.6.1.2194",
        "DUMP" :     "15.6.1.1280",
        "WORDS" :     "15.6.1.2465",
    },
    'TOOLS-EXT' : {
        "BYE" :     "15.6.2.0830",
        "CODE" :     "15.6.2.0930",
        "[IF]" :     "15.6.2.2532",
        ";CODE" :     "15.6.2.0470",
        "AHEAD" :     "15.6.2.0702",
        "STATE" :     "15.6.2.2250",
        "EDITOR" :     "15.6.2.1300",
        "FORGET" :     "15.6.2.1580",
        "[ELSE]" :     "15.6.2.2531",
        "[THEN]" :     "15.6.2.2533",
        "CS-PICK" :     "15.6.2.1015",
        "CS-ROLL" :     "15.6.2.1020",
        "ASSEMBLER" :     "15.6.2.0740",
    },
    'EXCEPTION' : {
        "CATCH" :      "9.6.1.0875",
        "THROW" :      "9.6.1.2275",
    },
    'EXCEPTION-EXT' : {
        "ABORT" :      "9.6.2.0670",
        'ABORT"' :      "9.6.2.0680",
    },
}

# Human-friendlier names of wordsets
ws = {
    'CORE' : 'Core',
    'CORE-EXT' : 'Core Extensions',
    'DOUBLE' : 'Double-Number',
    'DOUBLE-EXT' : 'Double-Number Extensions',
    'EXCEPTION' : 'Exception',
    'EXCEPTION-EXT' : 'Exception Extensions',
    'FACILITY' : 'Facility',
    'FACILITY-EXT' : 'Facility Extensions',
    'FILE' : 'File Access',
    'FILE-EXT' : 'File Access Extensions',
    'FLOATING' : 'Floating-Point',
    'FLOATING-EXT' : 'Floating-Point Extensions',
    'MEMORY' : 'Memory-Allocation',
    'SEARCH' : 'Search-Order',
    'SEARCH-EXT' : 'Search-Order Extensions',
    'STRING' : 'String',
    'TOOLS' : 'Programming-Tools',
    'TOOLS-EXT' : 'Programming-Tools Extensions',
}

# BLOCK                     "BLK" :      "7.6.1.0790",
# BLOCK                    "LOAD" :      "7.6.1.1790",
# BLOCK                   "BLOCK" :      "7.6.1.0800",
# BLOCK                   "FLUSH" :      "7.6.1.1559",
# BLOCK                  "BUFFER" :      "7.6.1.0820",
# BLOCK                  "UPDATE" :      "7.6.1.2400",
# BLOCK                "EVALUATE" :      "7.6.1.1360",
# BLOCK            "SAVE-BUFFERS" :      "7.6.1.2180",
# BLOCK-EXT                   "\" :      "7.6.2.2535",
# BLOCK-EXT                 "SCR" :      "7.6.2.2190",
# BLOCK-EXT                "LIST" :      "7.6.2.1770",
# BLOCK-EXT                "THRU" :      "7.6.2.2280",
# BLOCK-EXT              "REFILL" :      "7.6.2.2125",
# BLOCK-EXT       "EMPTY-BUFFERS" :      "7.6.2.1330",
# FILE                        "(" :     "11.6.1.0080",
# FILE                       "S"" :     "11.6.1.2165",
# FILE                      "BIN" :     "11.6.1.0765",
# FILE                      "R/O" :     "11.6.1.2054",
# FILE                      "R/W" :     "11.6.1.2056",
# FILE                      "W/O" :     "11.6.1.2425",
# FILE                 "INCLUDED" :     "11.6.1.1718",
# FILE                "FILE-SIZE" :     "11.6.1.1522",
# FILE                "OPEN-FILE" :     "11.6.1.1970",
# FILE                "READ-FILE" :     "11.6.1.2080",
# FILE                "READ-LINE" :     "11.6.1.2090",
# FILE                "SOURCE-ID" :     "11.6.1.2218",
# FILE               "CLOSE-FILE" :     "11.6.1.0900",
# FILE               "WRITE-FILE" :     "11.6.1.2480",
# FILE               "WRITE-LINE" :     "11.6.1.2485",
# FILE              "CREATE-FILE" :     "11.6.1.1010",
# FILE              "DELETE-FILE" :     "11.6.1.1190",
# FILE              "RESIZE-FILE" :     "11.6.1.2147",
# FILE             "INCLUDE-FILE" :     "11.6.1.1717",
# FILE            "FILE-POSITION" :     "11.6.1.1520",
# FILE          "REPOSITION-FILE" :     "11.6.1.2142",
# FILE-EXT               "REFILL" :     "11.6.2.2125",
# FILE-EXT           "FLUSH-FILE" :     "11.6.2.1560",
# FILE-EXT          "FILE-STATUS" :     "11.6.2.1524",
# FILE-EXT          "RENAME-FILE" :     "11.6.2.2130",
# FLOATING                   "F!" :     "12.6.1.1400",
# FLOATING                   "F*" :     "12.6.1.1410",
# FLOATING                   "F+" :     "12.6.1.1420",
# FLOATING                   "F-" :     "12.6.1.1425",
# FLOATING                   "F/" :     "12.6.1.1430",
# FLOATING                   "F<" :     "12.6.1.1460",
# FLOATING                   "F@" :     "12.6.1.1472",
# FLOATING                  "D>F" :     "12.6.1.1130",
# FLOATING                  "F0<" :     "12.6.1.1440",
# FLOATING                  "F0=" :     "12.6.1.1450",
# FLOATING                  "F>D" :     "12.6.1.1470",
# FLOATING                 "FDUP" :     "12.6.1.1510",
# FLOATING                 "FMAX" :     "12.6.1.1562",
# FLOATING                 "FMIN" :     "12.6.1.1565",
# FLOATING                 "FROT" :     "12.6.1.1610",
# FLOATING                "FDROP" :     "12.6.1.1500",
# FLOATING                "FLOOR" :     "12.6.1.1558",
# FLOATING                "FOVER" :     "12.6.1.1600",
# FLOATING                "FSWAP" :     "12.6.1.1620",
# FLOATING               ">FLOAT" :     "12.6.1.0558",
# FLOATING               "FALIGN" :     "12.6.1.1479",
# FLOATING               "FDEPTH" :     "12.6.1.1497",
# FLOATING               "FLOAT+" :     "12.6.1.1555",
# FLOATING               "FLOATS" :     "12.6.1.1556",
# FLOATING               "FROUND" :     "12.6.1.1612",
# FLOATING              "FNEGATE" :     "12.6.1.1567",
# FLOATING             "FALIGNED" :     "12.6.1.1483",
# FLOATING             "FLITERAL" :     "12.6.1.1552",
# FLOATING            "FCONSTANT" :     "12.6.1.1492",
# FLOATING            "FVARIABLE" :     "12.6.1.1630",
# FLOATING            "REPRESENT" :     "12.6.1.2143",
# FLOATING-EXT               "F." :     "12.6.2.1427",
# FLOATING-EXT               "F~" :     "12.6.2.1640",
# FLOATING-EXT              "DF!" :     "12.6.2.1203",
# FLOATING-EXT              "DF@" :     "12.6.2.1204",
# FLOATING-EXT              "F**" :     "12.6.2.1415",
# FLOATING-EXT              "FE." :     "12.6.2.1513",
# FLOATING-EXT              "FLN" :     "12.6.2.1553",
# FLOATING-EXT              "FS." :     "12.6.2.1613",
# FLOATING-EXT              "SF!" :     "12.6.2.2202",
# FLOATING-EXT              "SF@" :     "12.6.2.2203",
# FLOATING-EXT             "FABS" :     "12.6.2.1474",
# FLOATING-EXT             "FCOS" :     "12.6.2.1493",
# FLOATING-EXT             "FEXP" :     "12.6.2.1515",
# FLOATING-EXT             "FLOG" :     "12.6.2.1557",
# FLOATING-EXT             "FSIN" :     "12.6.2.1614",
# FLOATING-EXT             "FTAN" :     "12.6.2.1625",
# FLOATING-EXT            "FACOS" :     "12.6.2.1476",
# FLOATING-EXT            "FALOG" :     "12.6.2.1484",
# FLOATING-EXT            "FASIN" :     "12.6.2.1486",
# FLOATING-EXT            "FATAN" :     "12.6.2.1488",
# FLOATING-EXT            "FCOSH" :     "12.6.2.1494",
# FLOATING-EXT            "FLNP1" :     "12.6.2.1554",
# FLOATING-EXT            "FSINH" :     "12.6.2.1617",
# FLOATING-EXT            "FSQRT" :     "12.6.2.1618",
# FLOATING-EXT            "FTANH" :     "12.6.2.1626",
# FLOATING-EXT           "FACOSH" :     "12.6.2.1477",
# FLOATING-EXT           "FASINH" :     "12.6.2.1487",
# FLOATING-EXT           "FATAN2" :     "12.6.2.1489",
# FLOATING-EXT           "FATANH" :     "12.6.2.1491",
# FLOATING-EXT           "FEXPM1" :     "12.6.2.1516",
# FLOATING-EXT          "DFALIGN" :     "12.6.2.1205",
# FLOATING-EXT          "DFLOAT+" :     "12.6.2.1208",
# FLOATING-EXT          "DFLOATS" :     "12.6.2.1209",
# FLOATING-EXT          "FSINCOS" :     "12.6.2.1616",
# FLOATING-EXT          "SFALIGN" :     "12.6.2.2204",
# FLOATING-EXT          "SFLOAT+" :     "12.6.2.2207",
# FLOATING-EXT          "SFLOATS" :     "12.6.2.2208",
# FLOATING-EXT        "DFALIGNED" :     "12.6.2.1207",
# FLOATING-EXT        "PRECISION" :     "12.6.2.2035",
# FLOATING-EXT        "SFALIGNED" :     "12.6.2.2206",
# FLOATING-EXT    "SET-PRECISION" :     "12.6.2.2200",
# LOCAL                      "TO" :     "13.6.1.2295",
# LOCAL                 "(LOCAL)" :     "13.6.1.0086",
# LOCAL-EXT             "LOCALS|" :     "13.6.2.1795",
# MEMORY                   "FREE" :     "14.6.1.1605",
# MEMORY                 "RESIZE" :     "14.6.1.2145",
# MEMORY               "ALLOCATE" :     "14.6.1.0707",
# SEARCH                   "FIND" :     "16.6.1.1550",
# SEARCH               "WORDLIST" :     "16.6.1.2460",
# SEARCH              "GET-ORDER" :     "16.6.1.1647",
# SEARCH              "SET-ORDER" :     "16.6.1.2197",
# SEARCH            "DEFINITIONS" :     "16.6.1.1180",
# SEARCH            "GET-CURRENT" :     "16.6.1.1643",
# SEARCH            "SET-CURRENT" :     "16.6.1.2195",
# SEARCH         "FORTH-WORDLIST" :     "16.6.1.1595",
# SEARCH        "SEARCH-WORDLIST" :     "16.6.1.2192",
# SEARCH-EXT               "ALSO" :     "16.6.2.0715",
# SEARCH-EXT               "ONLY" :     "16.6.2.1965",
# SEARCH-EXT              "FORTH" :     "16.6.2.1590",
# SEARCH-EXT              "ORDER" :     "16.6.2.1985",
# SEARCH-EXT           "PREVIOUS" :     "16.6.2.2037",
